package com.zc.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: cong
 * @create: 2024/7/31
 */
@RestController
public class DemoController {
    @GetMapping("/hello")
    @PreAuthorize("hasAuthority('sayHello')")
    public String hello()
    {
        return "hello, springSecurity";
    }
}
